3.5.33 \(\int \sqrt {a+a \sinh ^2(e+f x)} \tanh ^2(e+f x) \, dx\) [433]

Optimal. Leaf size=57 \[ -\frac {\text {ArcTan}(\sinh (e+f x)) \sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)}{f}+\frac {\sqrt {a \cosh ^2(e+f x)} \tanh (e+f x)}{f} \]

[Out]

-arctan(sinh(f*x+e))*sech(f*x+e)*(a*cosh(f*x+e)^2)^(1/2)/f+(a*cosh(f*x+e)^2)^(1/2)*tanh(f*x+e)/f

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3255, 3286, 2672, 327, 209} \begin {gather*} \frac {\tanh (e+f x) \sqrt {a \cosh ^2(e+f x)}}{f}-\frac {\text {sech}(e+f x) \sqrt {a \cosh ^2(e+f x)} \text {ArcTan}(\sinh (e+f x))}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Sinh[e + f*x]^2]*Tanh[e + f*x]^2,x]

[Out]

-((ArcTan[Sinh[e + f*x]]*Sqrt[a*Cosh[e + f*x]^2]*Sech[e + f*x])/f) + (Sqrt[a*Cosh[e + f*x]^2]*Tanh[e + f*x])/f

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2672

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 3255

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3286

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \sqrt {a+a \sinh ^2(e+f x)} \tanh ^2(e+f x) \, dx &=\int \sqrt {a \cosh ^2(e+f x)} \tanh ^2(e+f x) \, dx\\ &=\left (\sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)\right ) \int \sinh (e+f x) \tanh (e+f x) \, dx\\ &=\frac {\left (\sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)\right ) \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\sinh (e+f x)\right )}{f}\\ &=\frac {\sqrt {a \cosh ^2(e+f x)} \tanh (e+f x)}{f}-\frac {\left (\sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (e+f x)\right )}{f}\\ &=-\frac {\tan ^{-1}(\sinh (e+f x)) \sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x)}{f}+\frac {\sqrt {a \cosh ^2(e+f x)} \tanh (e+f x)}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 40, normalized size = 0.70 \begin {gather*} \frac {\sqrt {a \cosh ^2(e+f x)} \text {sech}(e+f x) (-\text {ArcTan}(\sinh (e+f x))+\sinh (e+f x))}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Sinh[e + f*x]^2]*Tanh[e + f*x]^2,x]

[Out]

(Sqrt[a*Cosh[e + f*x]^2]*Sech[e + f*x]*(-ArcTan[Sinh[e + f*x]] + Sinh[e + f*x]))/f

________________________________________________________________________________________

Maple [A]
time = 1.10, size = 41, normalized size = 0.72

method result size
default \(-\frac {a \cosh \left (f x +e \right ) \left (-\sinh \left (f x +e \right )+\arctan \left (\sinh \left (f x +e \right )\right )\right )}{\sqrt {a \left (\cosh ^{2}\left (f x +e \right )\right )}\, f}\) \(41\)
risch \(\frac {\sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, {\mathrm e}^{2 f x +2 e}}{2 f \left ({\mathrm e}^{2 f x +2 e}+1\right )}-\frac {\sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}}{2 f \left ({\mathrm e}^{2 f x +2 e}+1\right )}+\frac {i \ln \left ({\mathrm e}^{f x}-i {\mathrm e}^{-e}\right ) \sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, {\mathrm e}^{f x +e}}{f \left ({\mathrm e}^{2 f x +2 e}+1\right )}-\frac {i \ln \left ({\mathrm e}^{f x}+i {\mathrm e}^{-e}\right ) \sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, {\mathrm e}^{f x +e}}{f \left ({\mathrm e}^{2 f x +2 e}+1\right )}\) \(227\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sinh(f*x+e)^2)^(1/2)*tanh(f*x+e)^2,x,method=_RETURNVERBOSE)

[Out]

-a*cosh(f*x+e)*(-sinh(f*x+e)+arctan(sinh(f*x+e)))/(a*cosh(f*x+e)^2)^(1/2)/f

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 53, normalized size = 0.93 \begin {gather*} \frac {2 \, \sqrt {a} \arctan \left (e^{\left (-f x - e\right )}\right )}{f} + \frac {\sqrt {a} e^{\left (f x + e\right )}}{2 \, f} - \frac {\sqrt {a} e^{\left (-f x - e\right )}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sinh(f*x+e)^2)^(1/2)*tanh(f*x+e)^2,x, algorithm="maxima")

[Out]

2*sqrt(a)*arctan(e^(-f*x - e))/f + 1/2*sqrt(a)*e^(f*x + e)/f - 1/2*sqrt(a)*e^(-f*x - e)/f

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (53) = 106\).
time = 0.47, size = 182, normalized size = 3.19 \begin {gather*} \frac {{\left (2 \, \cosh \left (f x + e\right ) e^{\left (f x + e\right )} \sinh \left (f x + e\right ) + e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{2} - 4 \, {\left (\cosh \left (f x + e\right ) e^{\left (f x + e\right )} + e^{\left (f x + e\right )} \sinh \left (f x + e\right )\right )} \arctan \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right ) + {\left (\cosh \left (f x + e\right )^{2} - 1\right )} e^{\left (f x + e\right )}\right )} \sqrt {a e^{\left (4 \, f x + 4 \, e\right )} + 2 \, a e^{\left (2 \, f x + 2 \, e\right )} + a} e^{\left (-f x - e\right )}}{2 \, {\left (f \cosh \left (f x + e\right ) e^{\left (2 \, f x + 2 \, e\right )} + f \cosh \left (f x + e\right ) + {\left (f e^{\left (2 \, f x + 2 \, e\right )} + f\right )} \sinh \left (f x + e\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sinh(f*x+e)^2)^(1/2)*tanh(f*x+e)^2,x, algorithm="fricas")

[Out]

1/2*(2*cosh(f*x + e)*e^(f*x + e)*sinh(f*x + e) + e^(f*x + e)*sinh(f*x + e)^2 - 4*(cosh(f*x + e)*e^(f*x + e) +
e^(f*x + e)*sinh(f*x + e))*arctan(cosh(f*x + e) + sinh(f*x + e)) + (cosh(f*x + e)^2 - 1)*e^(f*x + e))*sqrt(a*e
^(4*f*x + 4*e) + 2*a*e^(2*f*x + 2*e) + a)*e^(-f*x - e)/(f*cosh(f*x + e)*e^(2*f*x + 2*e) + f*cosh(f*x + e) + (f
*e^(2*f*x + 2*e) + f)*sinh(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sinh ^{2}{\left (e + f x \right )} + 1\right )} \tanh ^{2}{\left (e + f x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sinh(f*x+e)**2)**(1/2)*tanh(f*x+e)**2,x)

[Out]

Integral(sqrt(a*(sinh(e + f*x)**2 + 1))*tanh(e + f*x)**2, x)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 35, normalized size = 0.61 \begin {gather*} -\frac {\sqrt {a} {\left (4 \, \arctan \left (e^{\left (f x + e\right )}\right ) - e^{\left (f x + e\right )} + e^{\left (-f x - e\right )}\right )}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sinh(f*x+e)^2)^(1/2)*tanh(f*x+e)^2,x, algorithm="giac")

[Out]

-1/2*sqrt(a)*(4*arctan(e^(f*x + e)) - e^(f*x + e) + e^(-f*x - e))/f

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\mathrm {tanh}\left (e+f\,x\right )}^2\,\sqrt {a\,{\mathrm {sinh}\left (e+f\,x\right )}^2+a} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(e + f*x)^2*(a + a*sinh(e + f*x)^2)^(1/2),x)

[Out]

int(tanh(e + f*x)^2*(a + a*sinh(e + f*x)^2)^(1/2), x)

________________________________________________________________________________________